#pragma once

#include "cocos2d.h"
using namespace cocos2d;

class Mask : public CCLayerColor
{
public:
	static int mCount;

	Mask();
	~Mask(void);

	bool init();
	void onEnter();
	void onExit();

	void setTarget(CCObject *target, SEL_CallFunc selector);

	static Mask * create(float opacity);
private:
	CCObject* mTarget;
	SEL_CallFunc mSelector;
	void activate();
public:
	virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
	virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent);
	virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
	virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent);
};

